<template>

  <el-scrollbar>
    <div class="joinMeet">
      <div class="btnBox">
        <div style="margin-bottom: 20px">
          <el-button :type="'primary'" size="large" @click="joinMeet">加入已有会议</el-button>
        </div>
        <div style="margin-bottom: 20px">
          <el-button size="large" @click="demo">创建临时会议</el-button>
        </div>
        <div>
          <el-button :type="'success'" size="large">创建长期会议</el-button>
        </div>
      </div>
    </div>
    <div></div>
  </el-scrollbar>
</template>


<script>
import {ref,unref, getCurrentInstance, watch, reactive, onMounted} from "vue";
import {ElMessage, ElMessageBox} from 'element-plus';
import {useRouter} from "vue-router";

export default {
  name: "index",
  props:["info"],
  emits:["update:info"],
  components:{

  },
  setup(props ,content){
    const router = useRouter()
    const {proxy} = getCurrentInstance();
    let data = {

    }
    //监听
    watch(() => [props.info], ([newInfo],[oldInfo]) => {
      // if (newInfo){
      //   Object.assign(data.form, newInfo)
      // content.emit('update:info',newInfo)
      // }
    })
    onMounted(async () => {

    })
    let methods = {
      joinMeet(){
        window.electron.ipcRenderer.send('open-win','/meet/joinMeet')

      },
      demo(){
        window.electron.ipcRenderer.invoke("eventBothWay","异步发给主进程的消息");
      },
    }

    return {
      proxy,
      router,
      ...data,
      ...methods
    }
  }
}
</script>

<style lang="scss" scoped>

.joinMeet {
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;

  .btnBox {
    text-align: center;
  }
}
</style>
